<?php
/*
  $Id: information.php $
  Mefobe Cart Solutions
  http://www.mefobemarket.com

  Copyright (c) 2009 Wuxi Elootec Technology Co., Ltd;  Copyright (c) 2006 osCommerce

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/

class osC_Boxes_category_articles_menu extends osC_Modules {
	
	var 
	$_title, 
	$_code = 'category_articles_menu', 
	$_author_name = 'Guy Fomi', 
	$_author_www = 'http://www.mefobemarket.com',
	$_group = 'boxes';
	
	function osC_Boxes_category_articles_menu() {
		global $osC_Language;
		
		$this->_title = "Articles menu";
	}
	
	function initialize() {
		global $osC_Database, $osC_Language;
		
	if (isset($_GET['articles_id']) && !empty($_GET['articles_id'])) {
        $article = toC_Articles::getEntry($_GET['articles_id']);

        $id = $article ['articles_categories_id'];
      } else {
        $id = $_GET ['articles_categories_id'];
      }
      
		if ($id > 1)
		{
			$Qarticles = toC_Articles::getListing ($id);
		
		if ($Qarticles->numberOfRows () > 0) {
			$this->_content = '<ul>';
		while ( $Qarticles->next () ) {
			$this->_content .= '<li>' . osc_link_object ( osc_href_link ( FILENAME_INFO, 'articles&articles_id=' . $Qarticles->value ( 'articles_id' ) ), $Qarticles->value ( 'articles_name' ) ) . '</li>';
		}
		$this->_content .= '</ul>';
		}		
		}		
		
	}
}
?>
